﻿@model Noodles.Core.Model.PagedData<Noodles.Core.Model.BlogPost>

<table class="tablesorter" cellspacing="0"> 
			<thead> 
				<tr> 
   					<th></th> 
    				<th>Blog Title Name</th>     			
    				<th>Created On</th> 
    				<th>Actions</th> 
				</tr> 
			</thead> 
    <tbody>
        @foreach (var blog in Model.Data)
        {
            <tr>
            <td><input type="checkbox"></td> 
                <td>
                    @blog.Title
                </td>
                
                <td>
                  @blog.CreateDate
                </td>
                <td>                
                   @Html.ActionImage("Edit", "BlogPost", new { id = @blog.BlogID }, Url.Content("~/Content/images/icn_edit.png"), "Edit")
                   @Html.ActionImage("Delete", "BlogPost", new { id = @blog.BlogID }, Url.Content("~/Content/images/icn_delete.png"), "Delete")               
                </td>
            </tr>
        }
    </tbody>
    <tfoot>
        <tr>
            <td colspan="3">
                @for (int i = 1; i <= Model.NumberOfPages; i++)
                {
                    if (i == Model.CurrentPage)
                    {
                        @i
                    }
                    else
                    {
                        <a class="page-number" href="javascript:void();">@i</a>
                    }
                }
            </td>
        </tr>
    </tfoot>
</table>
<script type="text/javascript">
    $(".DeleteBlog").click(function () {
        if (confirm("Are You Sure  You Want To Delete The Blog ?")) {

        }
        else {
            return false;
        }


    });
    
    
</script>